# $Id$
# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
# Contributor: Jan de Groot <jgc@archlinux.org>

pkgname=totem-plparser
pkgver=3.10.7+40+g3859685
pkgrel=1
pkgdesc="Simple GObject-based library to parse and save a host of playlist formats"
url="https://git.gnome.org/browse/totem-pl-parser"
license=(LGPL)
arch=(i686 x86_64)
depends=(gmime libarchive libquvi libxml2)
makedepends=(intltool gobject-introspection git gnome-common gtk-doc libsoup)
_commit=38596857372ef60205da048d38d21f3b6368875f  # master
source=("git+https://git.gnome.org/browse/totem-pl-parser#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd totem-pl-parser
  git describe --tags | sed 's/^V_//;s/_/./g;s/-/+/g'
}

prepare() {
  cd totem-pl-parser
  NOCONFIGURE=1 ./autogen.sh
}

build() {
  cd totem-pl-parser
  ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \
      --libexecdir=/usr/lib --disable-static --enable-gtk-doc
  sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
  make
}

package(){
  cd totem-pl-parser
  make DESTDIR="$pkgdir" install
}
